package cn.bgs.controller;


import cn.bgs.common.R;
import cn.bgs.pojo.InvestmentAdvisory;
import cn.bgs.service.InvestmentAdvisoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 招商咨询表 前端控制器
 * </p>
 *
 * @author Mr.Zhao
 * @since 2022-08-08
 */
@RestController
@RequestMapping("/investment-advisory")
public class InvestmentAdvisoryController {

    @Autowired
    private InvestmentAdvisoryService investmentAdvisoryService;

    @GetMapping("/findInvestmentAdvisory")
    public R findInvestmentAdvisory(@RequestParam String inAdvInfo, @RequestParam String inAdvCompany){
        return investmentAdvisoryService.findInvestmentAdvisory(inAdvInfo, inAdvCompany);
    }

    @GetMapping("/findInvestmentAdvisoryId")
    public R findInvestmentAdvisoryId(Integer id){
        return investmentAdvisoryService.findInvestmentAdvisoryId(id);
    }

    @GetMapping("/delInvestmentAdvisory")
    public R delInvestmentAdvisory(@RequestParam Integer id){
        return investmentAdvisoryService.delInvestmentAdvisory(id);
    }

    @PostMapping("/addInvestmentAdvisory")
    public R addInvestmentAdvisory(@RequestBody InvestmentAdvisory investmentAdvisory){
        return investmentAdvisoryService.addInvestmentAdvisory(investmentAdvisory);
    }

    @PostMapping("/updateInvestmentAdvisory")
    public R updateInvestmentAdvisory(@RequestBody InvestmentAdvisory investmentAdvisory){
        return investmentAdvisoryService.updateInvestmentAdvisory(investmentAdvisory);
    }

}

